//
//  FAITHNewFeatureCell.m
//  彩票
//
//  Created by FAITH on 16/10/7.
//  Copyright © 2016年 FAITH. All rights reserved.
//

#import "XCNewFeatureCell.h"
#import "XCTabBarController.h"
@interface XCNewFeatureCell ()

//@property(nonatomic,weak)UIImageView *imageView;
@end

@implementation XCNewFeatureCell



-(void)indexPath:(NSIndexPath *)indexPath count:(NSInteger)count
{
    if (indexPath.item==count-1) {
        UIButton *btn=[UIButton buttonWithType:UIButtonTypeCustom];
        [btn setBackgroundImage:[UIImage imageNamed:@"guideStart"] forState:UIControlStateNormal];
        [btn sizeToFit];
        btn.center=CGPointMake(self.width*0.5, self.height*0.9);
        
        [btn addTarget:self action:@selector(start) forControlEvents:UIControlEventTouchDown];
        
        [self.contentView addSubview:btn];
        
    }

}

-(void)setImage:(UIImage *)image
{
    _image=image;
    

    [self setNeedsDisplay];
    
}

-(void)drawRect:(CGRect)rect
{
    [self.image drawInRect:rect];
}

-(void)start
{
    [UIApplication sharedApplication].keyWindow.rootViewController=[[XCTabBarController alloc] init];
}

@end
